﻿using RuoVea.GoFastdfs.Entity;
using RuoVea.GoFastdfs.Entity.Context;
using RuoVea.GoFastdfs.Service.Inserface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RuoVea.GoFastdfs.Service
{
    /// <summary>
    /// user用户表,逻辑处理
    /// </summary>
    public class UserService: IUserService
    {
        RuoVeaContext _context;
        public UserService(RuoVeaContext context)
        {
            _context = context;
        }
        /// <summary>
        /// 根据 account获取用户信息
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public UserEntity getUserByAccount(String account)
        {
            var query = _context.UserEntitys.Where(x => x.account.Equals(account));
            return query.FirstOrDefault();
        }
    }
}
